<?php
    
    namespace App\Observers;

    use App\System\Cms\Model\CmsArticle;
    use App\System\Log\Repositories\LogAdminRepository;

    class CmsArticleObserver
    {

        /**
         * 监听用户更新的事件。
         *
         * @param  CmsArticle  $cisUser
         * @return void
         */
        public function updated(CmsArticle $cmsArticle)
        {
            $data['type'] = 1;
            $data['log_info'] = '修改文章';
            $logAdmin = LogAdminRepository::getInstance();
            $logAdmin->saveAdminLog($data);
        }

    }
     
    